import { _decorator, Component, Node } from 'cc'
import { EventManager } from '../RunTime/EventManager'
import { CONTROLLER_ENUM, EVENT_ENUM } from '../Enums'
const { ccclass, property } = _decorator

@ccclass('ControllerManager')
export class ControllerManager extends Component {
  handleControl(evt: Event, type: string) {
    console.info(this.constructor.name, 'type', type)

    const inst = EventManager.getInstance(EventManager)
    inst.emit(EVENT_ENUM.PLAYER_CTRL, type as CONTROLLER_ENUM)
  }
}
